<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="format-detection" content="telphone=no, email=no"/>
<meta name="msapplication-tap-highlight" content="no">
<meta name="screen-orientation" content="portrait">
 
<title>推崇健康</title>
<link href="css/common.css" rel="stylesheet"/>
<link href="css/register.css" rel="stylesheet"/>
<link href="css/icofont.css" rel="stylesheet"/>
<script src="js/jquery-1.7.2.min.js" type="text/javascript"></script> 
<script type="text/javascript">
    $(document).ready(function(){
      $("#login_button").click(function(){
            var loginName = $("#loginName").val();
            var pwd = $("#pwd").val();
            if(loginName == ""){
                alert("手机号不能为空");
		        return;
            }
            if(pwd == ""){
                alert("密码不能为空");
		        return;
            }
            $.post("WeiXinApp!login.action?",
			    {
			      'phone':loginName,
			      'password1':pwd
			    },
			    function(data,status){
			 //     alert("数据：" + data + "\n状态：" + status);
			      if(data == 1){
			        window.location.href='WeiXinApp!firstLogin.action?phone='+loginName;
			      }else if(data == 2){
			        alert("密码错误");
			      }else if(data == 3){
			        alert("没有此用户");
			      }else if(data == 4){
			        alert("登录手机号码为空");
			      }else if(data == 4){
			        alert("登录密码为空");
			      }else{
			         alert("未知错误");
			      }
			 });
       });
  });
</script>
</head>

<body class="regbg">
	<!-- <header class="mui-bar mui-bar-nav">
	  	<h1 class="mui-title">登录</h1>
    </header> -->
    <main class="mui-content">
    	<div class="regbox">
        	<div class="regtable"> 
                <div class="regcell"> 
                        <div class="regkuan">
                        	<P class="regline"><a class="mui-ico ico-user mui-pull-left"></a><input type="text" id="loginName" name="username"  placeholder="请输入手机号" /></P>
                            <P class="regline"><a class="mui-ico ico-pass mui-pull-left"></a><input type="password"  id="pwd" name="userpass"  placeholder="请输入密码" /></P>
                            <div class="regnext"><input type="button"  name="btn"  id="login_button"  class="regbtn" value="提 &nbsp; 交"></div>
                            <p class="forgetpa"><a href="WeiXinApp!forgetPasswordView.action" >忘记密码?</a></p>
                        </div>
                </div> 
            </div> 
    	</div>
        <div class="regrg"><a href="WeiXinApp!registerView.action">还没有账号？立即注册</a></div>
    </main>
</body>
</html>